package demoMod.strongerheart.relics;

import basemod.abstracts.CustomRelic;
import com.badlogic.gdx.graphics.Texture;
import com.evacipated.cardcrawl.mod.stslib.relics.ClickableRelic;
import com.megacrit.cardcrawl.helpers.PowerTip;
import demoMod.strongerheart.StrongerHeartMod;

public class StrongerHeartRelic extends CustomRelic implements ClickableRelic {
    public static final String ID = StrongerHeartMod.makeID("StrongerHeartRelic");
    private static final String IMG_PATH = StrongerHeartMod.getResourcePath("relics/StrongerHeartRelic.png");
    private static final Texture OUTLINE = new Texture(IMG_PATH);

    public StrongerHeartRelic() {
        super(ID, OUTLINE, OUTLINE, RelicTier.SPECIAL, LandingSound.FLAT);
    }

    @Override
    public String getUpdatedDescription() {
        return DESCRIPTIONS[0] + DESCRIPTIONS[getDescIndex()];
    }

    @Override
    public void onRightClick() {
        StrongerHeartMod.enableReplace = !StrongerHeartMod.enableReplace;
        this.description = getUpdatedDescription();
        this.tips.clear();
        this.tips.add(new PowerTip(this.name, this.description));
    }

    private int getDescIndex() {
        return StrongerHeartMod.enableReplace ? 1 : 2;
    }
}
